This topic describes the steps required to create a dataset using the BindingSource class in Visual Studio.
For the purposes of all the examples found throughout the documentation, we will be using the various tables of the Access version of the Northwind database provided by Microsoft.
To create a dataset using the BindingSource class, the following steps must be performed:
Add a BindingSource control from the "Data" tab of your Toolbox. In the Properties window, click on the DataSource property of the BindingSource object. In the drop-down menu that appears, click on Add Project Data Source... This should launch the "Data Source Configuration Wizard" dialog. Choose the "Database" data source type and click "Next >". Choose the data connection by clicking on the "New Connection..." button. This should launch the "Add Connection" dialog. In the Add Connection dialog, change the data source by clicking on the Change... button. In the "Change Data Source" dialog that should appear, choose the "Microsoft Access Database File" option. Once this is done, click on the "OK" button. This should bring you to the "Add Connection" dialog. In the "Database file name" field of the “Add Connection” dialog, provide your Northwind Access database ("Northwind.mdb"). Click on the "Test Connection" button to make sure that the connection was successfully established, and then click on the "Ok" button to exit the "Add Connection" dialog. You should then be back in the "Data Source Configuration Wizard" dialog. In the "Data Source Configuration Wizard" dialog, click on the "Next >" button. Modify the connection string settings if you wish to do so and click "Next >" again. Choose the database objects you want in the dataset by expanding the "Tables" node and checking the Orders node.
- Click on the Finish button.
You are now ready to start using Xceed's grid control!